﻿using Xunit;

namespace Gamemaster.RollTests
{
    public class MinusTests
    {
        [Fact]
        public void SubtractsPositiveNumbercorrectly()
        {
            int roll = 13;
            int modifier = 3;

            int expected = 10;
            int actual = roll.Minus(modifier);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void SubtractsNegativeNumberCorrectly()
        {
            int roll = 13;
            int modifier = -3;

            int expected = 10;
            int actual = roll.Minus(modifier);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void WillNotResultInValuesBelowZero()
        {
            int roll = 2;
            int penalty = -3;

            int expected = 0;
            int actual = roll.Minus(penalty);

            Assert.Equal(expected, actual);
        }
    }
}
